#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int i = 0;
	int j = 0;
	int arr1[3][4] = { 0 };
	int arr2[4][3] = { 0 };
	for (i = 0;i < 4;i++)
		scanf("%d ", &arr1[0][i]);
	for (i = 0;i < 4;i++)
		scanf("%d ", &arr1[1][i]);
	for (i = 0;i < 4;i++)
		scanf("%d ", &arr1[2][i]);
	for (i = 0;i < 3;i++)
	{
		arr2[0][i] = arr1[i][0];
		arr2[1][i] = arr1[i][1];
		arr2[2][i] = arr1[i][2];
		arr2[3][i] = arr1[i][3];
	}
	for (i = 0;i < 4;i++)
	{
		for (j = 0;j < 3;j++)
		{
			printf("%d ", arr2[i][j]);
		}
		printf("\n");
	}
	return 0;
}